home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: uu4news.netcom.com!zodiac!szh
- From: szh@zcon.com (Syed Zaeem Hosain)
- Subject: Re: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
- Message-ID: <1996Mar15.183302.5364@zcon.com>
- Sender: szh@zcon.com (Syed Zaeem Hosain)
- Nntp-Posting-Host: zodiac
- Reply-To: szh@zcon.com
- Organization: Z Consulting Group
- References: <3148DBB6.1353@hawaii.edu>
- Date: Fri, 15 Mar 1996 18:33:02 GMT
-
- In article <3148DBB6.1353@hawaii.edu>, Dave Carien <davec@hawaii.edu> writes:
- >Yes or no on this, I just recently got confused by two different books. I
- >assume that the declaration foo[80] allocates storage for elements 0-79.
- >A string could be terminated by doing something like foo[79] = '\0', but
- >foo[80] = '\0' would be invalid because such an element does not exist.
- >Just looking for confirmation that I'm right here. A simple Y or N will
- >do thanks.
-
- Y
-
-
- --
- -------------------------------------------------------------------------
- | Syed Zaeem Hosain P. O. Box 610097 (408) 441-7021 |
- | Z Consulting Group San Jose, CA 95161 szh@zcon.com |
- -------------------------------------------------------------------------
-